<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
		<style type="text/css">
			p{
				display: none;
				position: absolute;
				/* 绝对定位：脱离文档流，不占位置 */
			}
			div:hover p{
				display: block;
			}
		</style>
	</head>
	<body>
		<div id="">
			图标
			<p>
				<img src="css动画/img/dog.jpg" width="50"><br>
				<img src="css动画/img/dog.jpg" width="50"><br>
				<img src="css动画/img/dog.jpg" width="50"><br>
				<img src="css动画/img/dog.jpg" width="50"><br>
				<img src="css动画/img/dog.jpg" width="50">
			</p>
		</div>
		<img src="2D/4.png" >
	
		<style type="text/css">
			.pic img{
				width:300px;
				height: 250px;
			}
			.bg{
				width:300px;
				height: 0px;
				background-color: red;
				position: absolute;
				opacity: 0.5;
				transition: 3s;
			}
			.pic:hover .bg{
				height: 250px;
			}
		</style>
		
		<div class="pic">
			<div class="bg"></div>
			<img src="css动画/img/dog.jpg" >
		</div>
	</body>
</html>
